package com.vehicle.service.imp;

import com.vehicle.bean.DataGridView;
import com.vehicle.mapper.InsuranceMapper;
import com.vehicle.pojo.Insurance;
import com.vehicle.service.InsuranceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class InsuranceServiceImpl implements InsuranceService {
    @Autowired
    private InsuranceMapper insuranceMapper;
    @Override
    public DataGridView findAllInsurance() {
        DataGridView dataGridView = new DataGridView();
        List<Insurance> insurances=insuranceMapper.selectAllInsurance();
        dataGridView.setData(insurances);
        dataGridView.setCode(1001);
        return dataGridView;
    }
}
